//
//  TTXMLObject.h
//  Tint
//
//  Created by Kevin Wu on 2/27/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTCore.h"
#import "TTAdditions.h"
#import "TTXML.h"


@interface NSObject (XMLObject)

+ (id)objectWithXMLData:(NSData *)XMLData;



+ (NSObject *)objectWithXMLNode:(TTXMLNode *)XMLNode;

+ (void)mapToNodeName:(NSString *)nodeName;
//+ (void)setClass:(Class)cls forNodeName:(NSString *)nodeName;
+ (Class)classForNodeName:(NSString *)nodeName;
+ (NSMutableDictionary *)translationDictionary;


/*
 * To override
 */
+ (NSDictionary *)propertyMap; // key = node name, value = property name.

@end


@interface NSArray (XMLObject)
+ (NSArray *)objectWithXMLNode:(TTXMLNode *)XMLNode;
@end

@interface NSDictionary (XMLObject)
+ (NSDictionary *)objectWithXMLNode:(TTXMLNode *)XMLNode;
@end
